home *** CD-ROM | disk | FTP | other *** search
- // CLOCK MODIFIER: EXAMPLE ANIMATION 3
- // ***********************************
- // This animation shows how the modified clock can be used to
- // alter the pigment, scaling, and translation of various
- // objects. It also shows how the clock_start and clock_finish
- // options can be used.
-
- // CAMERA AND LIGHTS
- camera {location <0, 0, -20> look_at <0, 0, 0> angle 40}
- light_source {<50, 50, -50> rgb 1}
-
- // CENTER SPHERE
- sphere {<0, 0, 0>, 1.5
-
- // CHANGE COLOUR FROM RED TO YELLOW
- #declare clock_type = "S-Curve" #include "ClockMod.inc"
- pigment {rgb <1, 0, 0> + <0, 1, 0> * mclock}
- finish {phong .5}
-
- // SCALE USING JUMP CLOCK
- #declare clock_type = "Jump" #declare clock_repeat = 3
- #include "ClockMod.inc"
- scale 1 + mclock}
-
- // ROD SHAPE
- #declare Rod = cylinder {0, y * 10, 1 pigment {rgb .5} finish {phong .5}}
-
- // LEFT ROD
- object {Rod
- #declare clock_type = "Recoil"
- #declare clock_start = 0 #declare clock_finish = .5
- #declare clock_repeat = 1
- #include "ClockMod.inc"
- translate <-5, 0, 0> + y * 3 * mclock}
-
- // RIGHT ROD
- object {Rod scale <1, -1, 1>
- #declare clock_type = "Recoil"
- #declare clock_start = .5 #declare clock_finish = 1
- #include "ClockMod.inc"
- translate <5, 0, 0> - y * 3 * mclock}
-